<?php

namespace App\Models;


use App\Service\Base\Model;
use Illuminate\Support\Facades\DB;

class OrderMoney extends Model
{

    // 用户管理
    protected $table = 'order_money';

    // 缓存字段，用于搜索绑定的字段
    protected $cacheFields = ['id', 'uid', 'event_id'];


    // {"id":"自编号","order_id":"订单ID","uid":"用户ID","agent_uid":"代理用户id","share_uid":"分享用户ID","number":"报名人数","organ_price":"机构价","person_price":"个人价","organ_amount":"机构总价","person_amount":"个人总价","pay_money":"支付金额","agent_money":"代理金额","share_money":"分享金额","platform_money":"平台金额","publish_money":"发布者金额","ctime":"注册时间","mtime":"更新时间"}

    // 订单支付 => 支付模型：进行支付操作


    // 定义验证操作
    public function rules()
    {

        $add = [
        ];

        $edit = [
        ];

        $info = [
        ];


        $rule = [
            //'id'             => 'number',
            'order_id'       => 'number',
            'uid'            => 'number',
            'agent_uid'      => 'number',
            'share_uid'      => 'number',
            'number'         => 'number',
            'organ_price'    => 'number',
            'person_price'   => 'number',
            'organ_amount'   => 'number',
            'person_amount'  => 'number',
            'pay_money'      => 'number',
            'agent_money'    => 'number',
            'share_money'    => 'number',
            'platform_money' => 'number',
            'publish_money'  => 'number',
        ];


        $msg = [
            'id'             => '自编号',
            'order_id'       => '订单ID',
            'uid'            => '用户ID',
            'agent_uid'      => '代理用户id',
            'share_uid'      => '分享用户ID',
            'number'         => '报名人数',
            'organ_price'    => '机构价',
            'person_price'   => '个人价',
            'organ_amount'   => '机构总价',
            'person_amount'  => '个人总价',
            'pay_money'      => '支付金额',
            'agent_money'    => '代理金额',
            'share_money'    => '分享金额',
            'platform_money' => '平台金额',
            'publish_money'  => '发布者金额',
            'ctime'          => '注册时间',
            'mtime'          => '更新时间',
        ];

        return ['rule' => $rule, 'msg' => $msg, 'add' => $add];
    }

}
